#define _CRT_SECURE_NO_WARNINGS 1
#include "Queue.h"

void QueueTest()
{
	Queue q;
	//初始化
	QueueInit(&q);
	//入队
	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePush(&q, 5);
	QueuePush(&q, 6);
	//取头数据
	QDataType front = QueueFront(&q);
	printf("对头数据是:%d\n", front);
	//取尾数据
	QDataType back = QueueBack(&q);
	printf("对尾数据是:%d\n", back);
	int size = QueueSize(&q);
	printf("队列有效元素个数为:%d\n", size);
	//销毁队列
	QueueDestroy(&q);
}
int main()
{
	QueueTest();
	return 0;
}
